﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SU.Center.Infa.Migrations
{
    public partial class Idha1213 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "RoleId",
                table: "UserInfos");

            migrationBuilder.AddColumn<DateTime>(
                name: "CreateDate",
                table: "UserRoles",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CreateOperatorId",
                table: "UserRoles",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreateOperatorName",
                table: "UserRoles",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DeleteDate",
                table: "UserRoles",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "DeleteOperatorId",
                table: "UserRoles",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DeleteOperatorName",
                table: "UserRoles",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "UserRoles",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "ModifyDate",
                table: "UserRoles",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ModifyOperatorId",
                table: "UserRoles",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ModifyOperatorName",
                table: "UserRoles",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreateDate",
                table: "Roles",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CreateOperatorId",
                table: "Roles",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreateOperatorName",
                table: "Roles",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DeleteDate",
                table: "Roles",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "DeleteOperatorId",
                table: "Roles",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DeleteOperatorName",
                table: "Roles",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "Roles",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "ModifyDate",
                table: "Roles",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ModifyOperatorId",
                table: "Roles",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ModifyOperatorName",
                table: "Roles",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreateDate",
                table: "RolePermissions",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CreateOperatorId",
                table: "RolePermissions",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreateOperatorName",
                table: "RolePermissions",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DeleteDate",
                table: "RolePermissions",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "DeleteOperatorId",
                table: "RolePermissions",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DeleteOperatorName",
                table: "RolePermissions",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "RolePermissions",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "ModifyDate",
                table: "RolePermissions",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ModifyOperatorId",
                table: "RolePermissions",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ModifyOperatorName",
                table: "RolePermissions",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreateDate",
                table: "Permissions",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CreateOperatorId",
                table: "Permissions",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreateOperatorName",
                table: "Permissions",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DeleteDate",
                table: "Permissions",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "DeleteOperatorId",
                table: "Permissions",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DeleteOperatorName",
                table: "Permissions",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "Permissions",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "ModifyDate",
                table: "Permissions",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ModifyOperatorId",
                table: "Permissions",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ModifyOperatorName",
                table: "Permissions",
                type: "nvarchar(max)",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreateDate",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "CreateOperatorId",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "CreateOperatorName",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "DeleteDate",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorId",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorName",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "ModifyDate",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorId",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorName",
                table: "UserRoles");

            migrationBuilder.DropColumn(
                name: "CreateDate",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "CreateOperatorId",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "CreateOperatorName",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "DeleteDate",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorId",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorName",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "ModifyDate",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorId",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorName",
                table: "Roles");

            migrationBuilder.DropColumn(
                name: "CreateDate",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "CreateOperatorId",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "CreateOperatorName",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "DeleteDate",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorId",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorName",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "ModifyDate",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorId",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorName",
                table: "RolePermissions");

            migrationBuilder.DropColumn(
                name: "CreateDate",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "CreateOperatorId",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "CreateOperatorName",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "DeleteDate",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorId",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "DeleteOperatorName",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "ModifyDate",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorId",
                table: "Permissions");

            migrationBuilder.DropColumn(
                name: "ModifyOperatorName",
                table: "Permissions");

            migrationBuilder.AddColumn<int>(
                name: "RoleId",
                table: "UserInfos",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
